Skip to content

Conversation

@mcull
Copy link
Owner

@mcull mcull commented Sep 29, 2025

Summary

Adds server-side logging across the invite flow to diagnose why invitees sometimes return to the collection as guests after verifying sign-in.

This branch is for troubleshooting only; it does not change behavior.

What’s Logged

  • join route: token (truncated), session presence, cookies set, and redirect target.
  • SSR gate: session present, param, invite cookie match, allow-guest vs redirect decision.
  • : unauthorized (401), private-without-invite, membership creation/reactivation, invite acceptance, and errors.
  • : session + cookie presence, invite lookup/expiry, membership upsert, invite acceptance, cookies cleared, and final redirect.

How to Test

  1. Generate a invite and open it while signed out.
  2. Confirm logs show guest cookies and redirect to .
  3. Click “Join Library” and complete email code sign-in.
  4. Confirm runs and upserts membership; on return, collection API should report role .

Notes

  • Intended to run in staging or a debug deploy to capture logs.
  • Safe to revert after we confirm the root cause.

@vercel
Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stufflibrary Ready Ready Preview Comment Sep 29, 2025 8:18am

@mcull mcull merged commit 6427e3b into main Sep 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants